//
//  InputTextView.m
//  SinaWeibo
//
//  Created by Apple on 16/8/16.
//  Copyright © 2016年 Apple. All rights reserved.
//

#import "InputTextView.h"

@interface InputTextView()


//@property (weak, nonatomic) UILabel *placehoderLabel;


@end

@implementation InputTextView

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self == [super initWithFrame:frame]) {
        
        UILabel *label = [[UILabel alloc]init];
        
        self.placehoderLabel = label;
        
        //默认placehodeText.
        label.text = @"请输入你想分享的内容";
        
        label.font = [UIFont systemFontOfSize:15];
        
        
        label.frame = CGRectMake(5, 8, 0, 0);
        
        [label sizeToFit];
    
//        label.backgroundColor = [UIColor greenColor];
        
        [self addSubview:label];
        
        self.font = [UIFont systemFontOfSize:15];
        
        
        
    }
    return self;
    
}


-(void)setPlaceholderText:(NSString *)placeholderText{
    
    _placeholderText = placeholderText;
    
    self.placehoderLabel.text = _placeholderText;
    
    self.placehoderLabel.textColor = [UIColor grayColor];
    
    self.placehoderLabel.numberOfLines = 0;
    
    
    CGFloat labelW = [UIScreen mainScreen].bounds.size.width;
    CGFloat labelH = 100;
    
    self.placehoderLabel.frame = CGRectMake(5, 8, labelW, labelH);
    
    [self.placehoderLabel sizeToFit];
    
    NSLog(@"labelFrame %@",NSStringFromCGRect(self.placehoderLabel.frame));
}




@end
